import { RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/:pathMatch(.*)*",
    component: () => import("@renderer/views/404.vue"),
    meta: { showLayout: false },
  },
  {
    path: "/login",
    name: "登录",
    component: () => import("@renderer/views/login/index.vue"),
    meta: { showLayout: false },
  },
  // {
  //   path: "/",
  //   name: "首页",
  //   component: () => import("@renderer/views/landing-page/LandingPage.vue"),
  //   meta: { showLayout: true },
  // },
  {
    path: "/",
    name: "首页",
    component: () => import("@renderer/views/home/index.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/trading/setting",
    name: "快捷键设置",
    component: () => import("@renderer/views/trading/setting.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/trading/fastTrade",
    name: "快捷交易",
    component: () => import("@renderer/views/trading/fastTrade.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/supervisoryCntrol/price",
    name: "价格提醒",
    component: () => import("@renderer/views/supervisoryCntrol/price.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/setting",
    name: "设置",
    component: () => import("@renderer/views/setting/index.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/systemSetting",
    name: "系统设置",
    component: () => import("@renderer/views/systemSetting/index.vue"),
    meta: { showLayout: true },
  },
  {
    path: "/accountManagement",
    name: "账号管理",
    meta: { showLayout: true },
    redirect: "/accountManagement/info",
    children: [
      {
        name: "账号信息",
        path: "/accountManagement/info",
        meta: { showLayout: true },
        component: () => import("@renderer/views/accountManagement/index.vue"),
      },
      {
        name: "交易记录",
        path: "/accountManagement/record",
        meta: { showLayout: true },
        component: () => import("@renderer/views/accountManagement/record.vue"),
      },
      {
        name: "资金划转",
        path: "/accountManagement/fund",
        meta: { showLayout: true },
        component: () => import("@renderer/views/accountManagement/fund.vue"),
      },
    ],
  },
];

export default routes;
